﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RptCrmBackMoneyInfo.aspx.cs" Inherits="ZX.WebApp.Crm.Report.RptCrmBackMoneyInfo" %>

<%@ Register Assembly="DevExpress.XtraReports.v11.2.Web, Version=11.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.XtraReports.Web" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/default/calendar.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <script src="../../Scripts/Jquery.form.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.calendar.js" type="text/javascript"></script>
    <script src="../../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        var setStartTime = function () {
            WdatePicker({ doubleCalendar: true, dateFmt: 'yyyy-MM-dd',
                onpicked: function (dp) {
                    parent.GetSetStartTime(dp.cal.getDateStr());
                }
            })
        };
        var setEndTime = function () {
            WdatePicker({ doubleCalendar: true, dateFmt: 'yyyy-MM-dd', onpicked:
                function (dp) {
                    parent.GetSetEndTime(dp.cal.getDateStr());
                }
            })
        };
        var check = function (obj) {
            $("#hdnFd").val(obj);
            if (getPar1("type") == "" && parent.getCustomerManger() != "0") {
                alert("请先选择左边的分公司树");
                return false;
            }
            return true;
        }
        var moreInfo = function (url, title) {
            var stime = $("#txtStime").val();
            var etime = $("#txtEtime").val();
            var deptid = getPar1("id");
            var type = getPar1("type");
            window.parent.parent.$("#tabs").tabs('close', title);
            var pagetitle = title; //.aspx
            if (parent.getCustomerManger() == "0") {
                deptid = $("#hdnId").val();
                type = 3;
                parent.parent.addTabs(pagetitle, url + "?startDate=" + stime + "&id=" + deptid + "&type=" + type + "&endDate=" + etime);
            } else {
                parent.parent.addTabs(pagetitle, url + "?startDate=" + stime + "&id=" + deptid + "&type=" + type + "&endDate=" + etime);
            }
            parent.parent.NeedRefreshPage = this;
        }
        var changeDate = function (obj) {
            

        }
    </script>
    <style type="text/css">
        a{text-decoration:none;color:Red;}
        a:hover{text-decoration:underline}
        .link{color:Blue;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
       <div>  
       <div id="content">
                <h3>
                    查询</h3>
                <table class="tableContent">
                    <tr>
                        <th width="10%" align="right">
                            日期：
                        </th>
                        <td>
                            &nbsp;&nbsp;从<input type="text" runat="server" class="inputText Wdate"
                                id="txtStime" readonly="readOnly" style="width: 145px;" onfocus="setStartTime();"/>
                                  至<input type="text" runat="server" class="inputText Wdate"
                                id="txtEtime" readonly="readOnly" style="width: 145px;" onfocus="setEndTime()" />
                            <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnDone_Click" OnClientClick="return check('')" CssClass="btnCheck" />
                             总额：<font color='red'><b><asp:Label ID="lblTotalMoney" runat="server" Text="0"></asp:Label></font></b> 万元
                        </td>
                    </tr>
                    <tr>
                    <th align="right"></th>
                    <td align="left"><b>&nbsp;&nbsp;<asp:LinkButton ID="lnkMonth" runat="server" OnClick="btnDone_Click" OnClientClick="return check('month');" CssClass="link">本月</asp:LinkButton>
                    &nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lnkSeason" runat="server" OnClick="btnDone_Click" OnClientClick="return check('season');" CssClass="link">本季度</asp:LinkButton>
                    &nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lnkYear" runat="server" OnClick="btnDone_Click" OnClientClick="return check('year');" CssClass="link">本年</asp:LinkButton></b> 
                    <asp:HiddenField ID="hdnFd" runat="server" />
                    </td>
                   </tr>
                   <tr>
                    <th align="right"></th>
                    <td align="left"><b>&nbsp;&nbsp;<a href="javascript:moreInfo('crm/report/RptCustomerAnalysis.aspx','分析报表')" title="分析报表">分析报表</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:moreInfo('crm/report/RptPerformanceRanking.aspx','团队排名明细')" title="更多团队排名">更多团队排名</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:moreInfo('crm/report/RptPersonRanking.aspx','个人排名明细')" title="更多个人排名">更多个人排名</a></b>
                    </td>
                   </tr>
                </table></div>
                <input type="hidden" runat="server" id="hdnId" />
               <dx:ReportToolbar ID="ReportToolbar1" runat="server" ShowDefaultButtons="False" 
            ReportViewerID="RV">
            <Items>
                <dx:ReportToolbarButton ItemKind="Search" />
                <dx:ReportToolbarSeparator />
                <dx:ReportToolbarButton ItemKind="PrintReport" />
                <dx:ReportToolbarButton ItemKind="PrintPage" />
                <dx:ReportToolbarSeparator />
                <dx:ReportToolbarButton Enabled="False" ItemKind="FirstPage" />
                <dx:ReportToolbarButton Enabled="False" ItemKind="PreviousPage" />
                <dx:ReportToolbarLabel ItemKind="PageLabel" />
                <dx:ReportToolbarComboBox ItemKind="PageNumber" Width="65px">
                </dx:ReportToolbarComboBox>
                <dx:ReportToolbarLabel ItemKind="OfLabel" />
                <dx:ReportToolbarTextBox IsReadOnly="True" ItemKind="PageCount" />
                <dx:ReportToolbarButton ItemKind="NextPage" />
                <dx:ReportToolbarButton ItemKind="LastPage" />
                <dx:ReportToolbarSeparator />
                <dx:ReportToolbarButton ItemKind="SaveToDisk" />
                <dx:ReportToolbarButton ItemKind="SaveToWindow" />
                <dx:ReportToolbarComboBox ItemKind="SaveFormat" Width="70px">
                    <Elements>
                        <dx:ListElement Value="pdf" />
                        <dx:ListElement Value="xls" />
                        <dx:ListElement Value="xlsx" />
                        <dx:ListElement Value="rtf" />
                        <dx:ListElement Value="mht" />
                        <dx:ListElement Value="html" />
                        <dx:ListElement Value="txt" />
                        <dx:ListElement Value="csv" />
                        <dx:ListElement Value="png" />
                    </Elements>
                </dx:ReportToolbarComboBox>
            </Items>
            <Styles>
                <LabelStyle>
                <Margins MarginLeft="3px" MarginRight="3px" />
                </LabelStyle>
            </Styles>
        </dx:ReportToolbar>
        
              <dx:ReportViewer ID="RV" runat="server" > </dx:ReportViewer>
           </div>
    </form>
</body>
</html>
